﻿package com.toncen.samepms.system.domain;

import java.util.Date;

import com.toncen.samepms.common.AbstractDomain;
import com.toncen.samepms.common.IOperatingUnlogable;
import com.sky.dataimport.DynamicCellDataCell;
import com.sky.dataimport.DynamicCellDataRow;
import com.sky.dataimport.DynamicRowDataCell;
import com.sky.dataimport.DynamicRowDataRow;
import com.sky.dataimport.StaticDataCell;
import com.sky.dataimport.StaticDataRow;
import com.sky.dataimport.datatype.DateDataType;
import com.sky.dataimport.datatype.IntegerDataType;
import com.sky.dataimport.formater.UtilDateDataFormater;
 
/**
 * 描述：登录日志表SYSTEM_LOGIN_LOG的domain文件
 * 
 * @author zq 
 */
@DynamicRowDataRow(title = "动态行登录日志", sheetIndex = 1, startRowIndex = 2, startCellIndex = 1, inserted = false)
@DynamicCellDataRow(title = "动态列登录日志", sheetIndex = 1, startRowIndex = 2, startCellIndex = 2, inserted = false)
@StaticDataRow(title = "静态行列登录日志", sheetIndex = 1)
public class LoginLog extends AbstractDomain  implements IOperatingUnlogable{
	/**
	 * 序列号
	 */
	private static final long serialVersionUID = 1341487744935L;
	
	/**
	 * 登录用户
	 */ 
	@StaticDataCell(rowIndex = 1, cellIndex = 1, title = "登录用户")
	@DynamicRowDataCell(cellIndex = 1,  title = "登录用户", require = false)
	@DynamicCellDataCell(rowIndex = 1,  title = "登录用户", require = false)
	@IntegerDataType(msg = "必须为整数类型")
	private  long userId; 	 
    
	/**
	 * 登录时间
	 */ 
	@StaticDataCell(rowIndex = 2, cellIndex = 2, title = "登录时间")
	@DynamicRowDataCell(cellIndex = 2, title = "登录时间", formater = UtilDateDataFormater.class, option = "yyyy-MM-dd", require = false)
	@DynamicCellDataCell(rowIndex = 2, title = "登录时间", formater = UtilDateDataFormater.class, option = "yyyy-MM-dd", require = false)
	@DateDataType
	private  Date loginDate; 	 
    
	/**
	 * 登录类型
	 */ 
	@StaticDataCell(rowIndex = 3, cellIndex = 3, title = "登录类型")
	@DynamicRowDataCell(cellIndex = 3,  title = "登录类型", require = false)
	@DynamicCellDataCell(rowIndex = 3,  title = "登录类型", require = false)
	@IntegerDataType(msg = "必须为整数类型")
	private  int type; 	 
    
	/**
	 * 登录帐号
	 */ 
	@StaticDataCell(rowIndex = 4, cellIndex = 4, title = "登录帐号")
	@DynamicRowDataCell(cellIndex = 4,  title = "登录帐号", require = false)
	@DynamicCellDataCell(rowIndex = 4,  title = "登录帐号", require = false)
	private  String account; 	 
    
	/**
	 * 登录IP
	 */ 
	@StaticDataCell(rowIndex = 5, cellIndex = 5, title = "登录IP")
	@DynamicRowDataCell(cellIndex = 5,  title = "登录IP", require = false)
	@DynamicCellDataCell(rowIndex = 5,  title = "登录IP", require = false)
	private  String ip; 	 
    
	/**
	 * 登录主机
	 */ 
	@StaticDataCell(rowIndex = 6, cellIndex = 6, title = "登录主机")
	@DynamicRowDataCell(cellIndex = 6,  title = "登录主机", require = false)
	@DynamicCellDataCell(rowIndex = 6,  title = "登录主机", require = false)
	private  String host; 	 
    
	/**
	 * 登录端口
	 */ 
	@StaticDataCell(rowIndex = 7, cellIndex = 7, title = "登录端口")
	@DynamicRowDataCell(cellIndex = 7,  title = "登录端口", require = false)
	@DynamicCellDataCell(rowIndex = 7,  title = "登录端口", require = false)
	private  String port; 	 
    

	public LoginLog() {
		super();
	}
	

	public LoginLog(long userId,String account, Date loginDate, int type,  String ip, String host, String port) {
		super();
		this.userId = userId;
		this.loginDate = loginDate;
		this.type = type;
		this.account = account;
		this.ip = ip;
		this.host = host;
		this.port = port;
	}


	/**
	 * @return the  userId
	 */
	public  long getUserId() {
		return  userId;
	}

	/**
	 * @param  userId
	 *            the  userId to set
	 */
	public void setUserId( long  userId) {
		this. userId =  userId;
	}
	
	/**
	 * @return the  loginDate
	 */
	public  Date getLoginDate() {
		return  loginDate;
	}

	/**
	 * @param  loginDate
	 *            the  loginDate to set
	 */
	public void setLoginDate( Date  loginDate) {
		this. loginDate =  loginDate;
	}
	
	/**
	 * @return the  type
	 */
	public  int getType() {
		return  type;
	}

	/**
	 * @param  type
	 *            the  type to set
	 */
	public void setType( int  type) {
		this. type =  type;
	}
	
	/**
	 * @return the  account
	 */
	public  String getAccount() {
		return  account;
	}

	/**
	 * @param  account
	 *            the  account to set
	 */
	public void setAccount( String  account) {
		this. account =  account;
	}
	
	/**
	 * @return the  ip
	 */
	public  String getIp() {
		return  ip;
	}

	/**
	 * @param  ip
	 *            the  ip to set
	 */
	public void setIp( String  ip) {
		this. ip =  ip;
	}
	
	/**
	 * @return the  host
	 */
	public  String getHost() {
		return  host;
	}

	/**
	 * @param  host
	 *            the  host to set
	 */
	public void setHost( String  host) {
		this. host =  host;
	}
	
	/**
	 * @return the  port
	 */
	public  String getPort() {
		return  port;
	}

	/**
	 * @param  port
	 *            the  port to set
	 */
	public void setPort( String  port) {
		this. port =  port;
	}
	
}
